package com.stress.testing.plugin.nosql.redis.deserializer;

import java.io.UnsupportedEncodingException;

public class StringKeyDeserializer implements KeyDeserializer {
    @Override
    public String deserialize(byte[] key) {
        if (key == null) {
            return null;
        }

        try {
            return new String(key, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        }
    }
}
